<form action="" method="post" class="row">
<input type="hidden" name="order_id" value="{:$order['id']}" />
<div class="card">
  <header class="card-header"><div class="card-title">收费标准</div></header>
  <div class="card-body">
    <div class="row mb-3">
        <?php $field = 'bg_sn'; $vo = ['name'=>'报告编号','type'=>'disabled','value'=>$order_bg['bg_sn']]; ?>
        <div class="col-md-4">
          {include file="html/fields/disabled" /}
        </div>

        <?php $field = 'client_type'; $vo = ['name'=>'业务类型','type'=>'disabled','value'=>$OrderModel->getClientTypeCn($order['client_type'])]; ?>
        <div class="col-md-4">
          {include file="html/fields/disabled" /}
        </div>

        <?php $field = 'order_sn'; $vo = ['name'=>'报告类型','type'=>'disabled','value'=>$OrderBgModel->getTypeCn($order_bg['type'])]; ?>
        <div class="col-md-4">
          {include file="html/fields/disabled" /}
        </div>
    </div>

    <div class="row mb-3">
        <?php $field = 'order_sn'; $vo = ['name'=>'委托客户','type'=>'disabled','value'=>$order_bg['bg_sn']]; ?>
        <div class="col-md-4">
          {include file="html/fields/disabled" /}
        </div>

        <?php $field = 'client_name'; $vo = ['name'=>'委托方','type'=>'disabled','value'=>$order['client_name']]; ?>
        <div class="col-md-4">
          {include file="html/fields/disabled" /}
        </div>

        <?php $field = 'business_contact'; $vo = ['name'=>'业务联系人','type'=>'disabled','value'=>$order['business_contact']]; ?>
        <div class="col-md-4">
          {include file="html/fields/disabled" /}
        </div>
    </div>

    <div class="row mb-3">
        <?php $field = 'yw_aid'; $vo = ['name'=>'业务员','type'=>'disabled','value'=>$order['yw_admin']['truename']]; ?>
        <div class="col-md-4">
          {include file="html/fields/disabled" /}
        </div>

        <?php $field = 'total_price'; $vo = ['name'=>'评估总值','type'=>'disabled','value'=>$order_price['total_price']]; ?>
        <div class="col-md-4">
          {include file="html/fields/disabled" /}
        </div>

        <?php $field = 'order_status'; $vo = ['name'=>'业务状态','type'=>'disabled','value'=>$OrderModel->getStatusCn($order['status'])]; ?>
        <div class="col-md-4">
          {include file="html/fields/disabled" /}
        </div>
    </div>

    <div class="row mb-3">
        <?php $field = 'bg_aid'; $vo = ['name'=>'报告撰写人','type'=>'disabled','value'=>$order_bg['admin']['truename']]; ?>
        <div class="col-md-4">
          {include file="html/fields/disabled" /}
        </div>

        <?php $field = 'is_charge_monthly'; $vo = ['name'=>'是否月结','type'=>'select1','params'=>$OrderBgModel->getCommonIsList()]; ?>
        <div class="col-md-4">
          {include file="html/fields/select1" /}
        </div>

        <?php $field = 'status'; $vo = ['name'=>'收费状态','type'=>'disabled','value'=>$model->getStatusCn($data['status'])]; ?>
        <div class="col-md-4">
          {include file="html/fields/disabled" /}
        </div>
    </div>

    <div class="row mb-3">
        <?php $field = 'borrower'; $vo = ['name'=>'借款人','type'=>'disabled','value'=>$order['borrower']]; ?>
        <div class="col-md-4">
          {include file="html/fields/disabled" /}
        </div>

        <?php $field = 'company_name'; $vo = ['name'=>'分支机构','type'=>'disabled','value'=>$order['c_admin']['company_name']]; ?>
        <div class="col-md-4">
          {include file="html/fields/disabled" /}
        </div>

        <?php $field = 'order_sn'; $vo = ['name'=>'业务联系人电话','type'=>'disabled','value'=>$order['business_mobile']]; ?>
        <div class="col-md-4">
          {include file="html/fields/disabled" /}
        </div>
    </div>

    <div class="row mb-3">
        <?php $field = 'admin_id'; $vo = ['name'=>'收款负责人','type'=>'select1','params'=>$admins]; ?>
        <div class="col-md-4">
          {include file="html/fields/select1" /}
        </div>

        <?php $field = 'department_name'; $vo = ['name'=>'业务员部门','type'=>'disabled','value'=>$order['yw_admin']['department_name']]; ?>
        <div class="col-md-4">
          {include file="html/fields/disabled" /}
        </div>

        <?php $field = ''; $vo = ['name'=>'预收费','type'=>'disabled','value'=>'']; ?>
        <div class="col-md-4">
          {include file="html/fields/disabled" /}
        </div>
    </div>

    <div class="row mb-3">
        <?php $field = ''; $vo = ['name'=>'预评已收金额','type'=>'disabled','value'=>'']; ?>
        <div class="col-md-4">
          {include file="html/fields/disabled" /}
        </div>

        <?php $field = 'payer_name'; $vo = ['name'=>'付款方名称','type'=>'text']; ?>
        <div class="col-md-4">
          {include file="html/fields/text" /}
        </div>

        <?php $field = 'standard'; $vo = ['name'=>'收费标准','type'=>'select1','params'=>$model->getStandardList()]; ?>
        <div class="col-md-4">
          {include file="html/fields/select1" /}
        </div>
        
    </div>

    <div class="row mb-3">
        

        <?php $field = 'privilege_type'; $vo = ['name'=>'收费优惠','type'=>'select1','params'=>$model->getPrivilegeTypeList()]; ?>
        <div class="col-md-4">
          {include file="html/fields/select1" /}
        </div>

        <?php $field = 'privilege_text'; $vo = ['name'=>'优惠金额','type'=>'text']; ?>
        <div class="col-md-4">
          {include file="html/fields/text" /}
        </div>

        <?php $field = 'receivable_amount'; $vo = ['name'=>'应收金额','type'=>'text']; ?>
        <div class="col-md-4">
          {include file="html/fields/text" /}
        </div>
        
    </div>

    
  </div>
</div>

<div class="card">
  <header class="card-header"><div class="card-title">收款方信息</div></header>
  <div class="card-body">
    <div class="row mb-3">
        
        <?php $field = 'collection_account'; $vo = ['name'=>'收款账号','type'=>'text']; ?>
        <div class="col-md-4">
          {include file="html/fields/text" /}
        </div>

        <?php $field = 'collection_bank'; $vo = ['name'=>'收款银行','type'=>'text']; ?>
        <div class="col-md-4">
          {include file="html/fields/text" /}
        </div>

        <?php $field = 'collection_name'; $vo = ['name'=>'开户名','type'=>'text']; ?>
        <div class="col-md-4">
          {include file="html/fields/text" /}
        </div>
        
    </div>

    <?php $field = 'collection_remark'; $vo = ['name'=>'收费备注','type'=>'textarea']; ?>
    <div class="mb-3 col-md-12">
      {include file="html/fields/textarea" /}
    </div>
  </div>
</div>

<div class="card">
  <header class="card-header"><div class="card-title">付款方信息</div></header>
  <div class="card-body">
    <div class="row mb-3">
        <?php $field = 'payment_name'; $vo = ['name'=>'付款方公司名','type'=>'text']; ?>
        <div class="col-md-4">
          {include file="html/fields/text" /}
        </div>

        <?php $field = 'payment_ratepayer'; $vo = ['name'=>'统一社会信用代码','type'=>'text']; ?>
        <div class="col-md-4">
          {include file="html/fields/text" /}
        </div>

        <?php $field = 'payment_bank'; $vo = ['name'=>'付款方开户行','type'=>'text']; ?>
        <div class="col-md-4">
          {include file="html/fields/text" /}
        </div>
    </div>
    <div class="row mb-3">
        <?php $field = 'payment_account'; $vo = ['name'=>'付款方银行账号','type'=>'text']; ?>
        <div class="col-md-4">
          {include file="html/fields/text" /}
        </div>

        <?php $field = 'payment_address'; $vo = ['name'=>'付款方公司地址','type'=>'text']; ?>
        <div class="col-md-4">
          {include file="html/fields/text" /}
        </div>

        <?php $field = 'payment_tel'; $vo = ['name'=>'付款方电话号码','type'=>'text']; ?>
        <div class="col-md-4">
          {include file="html/fields/text" /}
        </div>
    </div>

    <div class="mb-3 col-md-12">
      <button type="submit" class="btn btn-primary ajax-post" target-form="add-form">确 定</button>
      <button type="button" class="btn btn-default" onclick="javascript:history.back(-1);return false;">返 回</button>
    </div>
    
  </div>
</div>
</form>


<script type="text/javascript">
  $("#company_id").on('change',function(){
    $.ajax({
        url:'{:url("admin/indexForAjax")}',
        data:{company_id:$(this).val(),role:'yw'},
        type:'post',
        dataType:'json',
        success:function(data){
          var str = '';
          for(var i in data){
            str += '<option value="'+i+'">'+data[i]+'</option>';
          }
          $("#yw_aid").html(str);
        }
    });
  });


</script>